import request from '../request.js'

// 广告位/幻灯片
function detailPos(query) {
    return request.get('/api/cms/position/detail', query, false)
}

// 文章详情
function detailArticle(query) {
    return request.get('/api/cms/article/detail', query, false)
}

// 公告列表
function articleNotice(query) {
    return request.get('/api/cms/article/notice', query, false)
}

// 广告详情
function detailAd(query) {
    return request.get('/api/cms/position/ad', query, false)
}

function getCategory(query) {
    return request.get('/api/cms/category/tree', query, false)
}

function getCategoryByCode(query) {
    return request.get('/api/cms/category/getByCode', query, false)
}

function listArticle(query) {
    return request.get('/api/cms/article/list', query, false)
}

export default {
    detailPos,
    detailArticle,
    articleNotice,
    detailAd,
    getCategory,
    getCategoryByCode,
    listArticle,
}